<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <button @click="changeUrl">改变图片地址</button>
    <!-- <img v-bind:src="url" alt="" width="300">
    <div v-bind:aa="a">11</div> -->

    <img :src="url" alt="" width="300">
    <div :aa="a">11</div>
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {
          a: '这是自定义属性的值',
          url: 'https://img2.baidu.com/it/u=1557631777,3824903483&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500'
        }
      },
      methods: {
        changeUrl(){
          this.url = 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.3gbizhi.com%2F2021%2F0222%2F20210222085249777.jpg&refer=http%3A%2F%2Fpic.3gbizhi.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1674627696&t=53fc388fd02d24a5ec338bbb7c094273'
        }
      }
    })
    app.mount('#app')
  </script>
</body>
</html>